package com.ruoyi.common.core.enums;

/**
 * Created by liChangjiang on 2017/4/11.
 */
public enum ErrorCode
{
    Success(0,"操作成功"),
    Failure(1,"操作失败"),
    NeedLogin(2,"用户没有登录"),
    UnExceptedError(3,"未知的错误发生"),
    /**
     * 参数错误
     */
    IllegalArument(4,"参数错误"),
    IllegalArumentNotPhon(4,"参数错误,手机号码不存在"),
    IllegalArument5(4,"参数错误,专业市场ID不存在"),
    SQLIntegrityConstraintViolation(5,"违反完整性约束"),
    NoAuthorization(6,"没有权限执行此操作"),
    CheckLoginFailure(7,"用户不存在或者密码错误"),
    UserNameExists(8,"登录名称已存在"),
    RoleNameExists(9,"角色名已存在"),
    RoleIsUsed(10,"角色已经被使用"),
    UserLocked(11,"用户被锁定"),
    OldPwdNotRight(12,"原密码不正确"),
    NewPwdNotMatchConfirmPwd(13,"新密码与确认密码不一致"),
    SqlSyntaxError(14,"数据库执行异常"),
    AttributeDoesNotExist(15,"属性名不存在"),
    UserNotExists(16,"用户不存在"),
    FailedToCacheUserDate(17,"缓存用户信息失败"),
    FailedToCacheAuthCode(18,"缓存用户权限失败"),
    FailedToRenewLeaseSession(19,"更新SESSION失败"),
    upExError(20,"营销反馈ID为空或该客户没有开始营销"),
    /**----------------------------------------------------------------
     * 线以上内容请不要修改
     * ----------------------------------------------------------------**/
     YourErrorCodeGoesHere(1000,"你的失败码请在后面定义"),


    UpdateCustomerFail(1101,"修改客户信息失败"),
    AllotCustomerFail(1102,"分配客户信息失败"),
    QueryAllotCustomerError(1103,"查询公共池客户信息异常"),
    AllotCustomerSuccess(1104,"分配客户信息成功"),
    EnterNecessaryInformation(1105,"请输入必要的分配信息"),
    AssignedUserDoesNotExist(1106,"指定分配用户不存在"),
    AccountCannotParticipateAllotCustomer(1107,"当前账户不能参与客户分配操作"),


    ParameterCodeExit(2001,"查询公共池客户信息异常"),


    /*******************地图相关*******************/
    PointNumIsError(4001,"传参地图点数量有误"),



    /*******************营销任务******************/
    TaskIdIsEmpty(5001,"营销任务ID为空"),

    TaskIsStarted(5002,"营销任务已开始"),
    TaskIsEnd(5003,"营销任务已结束"),
    TaskIsNotStart(5004,"营销任务还未开始"),
    QueryCustomerByPlanFail(5005,"根据方案查询用户集合失败"),
    TaskInsertSuccess(0,"营销任务添加成功，正在关联客户信息"),
    CannotAddTask(5006,"不是总行人员，无法添加总行营销任务"),
    UserInfoIsNull(5007,"任务没有指派客户经理"),
    CannotDelZHTask(5008,"不是总行操作人员，不可以删除总行营销任务"),
    NotCreateUser(5009,"不是任务创建者，无法删除该任务"),
    NotQueryTask(5010,"未查询到相应的营销任务"),
    ExistTaskByTaskName(5011,"存在同名未完成任务"),
    ExistTaskByKhIdCard(5012,"客户存在未完成营销任务"),
    /**
     * NotQueryResult
     * 未查询到满足条件的客户
     */
    NotQueryResult(5011,"未查询到满足条件的客户"),
    NotQueryResults(5012,"该登陆账号没有权限进行转户（仅支行行长或管理员角色或者总行人员）"),
    /*******************设备号任务******************/
    TokenExist(6001,"该设备号已绑定该用户"),
    TokenInsertFail(6002,"添加设备号失败"),
    TokenDeleteFail(6003,"设备号删除失败"),
    InsertIllegalArument(6004,"插入信息有误(必须填写具体信息)"),
    UserIdExist(6005,"该用户不能重复绑定该设备号"),
    PhoneException(6006,"手机号格式异常"),
    /*******************修改客户信息任务******************/
    IdCardExist(7001,"该身份证号已经存在"),
	
	/*******************导入操作******************/
	SheetIsNull(8001,"文件sheet为空!"),
	
	FileIsEx(8002,"文件异常!");
    private String desc;
    private int code;

    private ErrorCode(int code, String desc)
    {
        this.desc = desc;
        this.code = code;
    }

    public String getDesc()
    {
        return desc;
    }

    public int getCode()
    {
        return code;
    }
}
